import { Component, ViewChild } from '@angular/core';
import { NavController, NavParams, Nav } from 'ionic-angular';
import { DepartmentServicePage } from '../department-service/department-service';
import { AboutPage } from '../about/about';



@Component({
  selector: 'page-service-sidemenu',
  templateUrl: 'service-sidemenu.html',
})
export class ServiceSidemenuPage {

  @ViewChild(Nav) nav: Nav;
  rootPage: any = DepartmentServicePage;
  pages: Array<{title: string, component: any}>;


  constructor(public navCtrl: NavController, public navParams: NavParams) {
  }

  ionViewDidLoad() {
    this.pages=[
      {title: '位置信息', component: DepartmentServicePage},
      {title: '相关信息', component: AboutPage}
    ];
  }

  openPage(page) {
    this.nav.setRoot(page.component);
  }

}
